import request from '@/utils/request'

export function list(params) {
    return request({
        url: '/system/admin-role/list',
        method: 'get',
        params
    })
}

export function listKv(name) {
    return request({
        url: '/system/admin-role/list-kv',
        method: 'get',
        params: {
            'name': name
        }
    });
}

export function put(data) {
    return request({
        url: '/system/admin-role/put',
        method: 'post',
        data
    });
}

export function del(roleCode) {
    return request({
        url: '/system/admin-role/del',
        method: 'post',
        data: { 'roleCode': roleCode }
    });
}